package ch4.object;

class SuperClass {
	private int n;
	SuperClass() { System.out.println("SuperClass()"); }
	SuperClass(int n) {
		System.out.println("SuperClass(" + n + ")");
		this.n = n;
	}
	void getSuperN() {
		System.out.println("Super N "+ n);
	}
}

class SubClass extends SuperClass {
	private int n;
	SubClass(int n) {
		super();
		System.out.println("SubClass(" + n + ")");
		this.n = n;
	}
	SubClass() {
		super(300);
		System.out.println("SubClass()");
	}
	
	void getSubN() {
		System.out.println("Sub N "+ n);
	}
}

public class TestSuperSub {
	public static void main(String arg[]) {
		SubClass sc1 = new SubClass();
		sc1.getSuperN();
		sc1.getSubN();
		
	}
}
